Machine Learning Identifies Variation in Timing of Palliative Care Consultations Among Traumatic Brain Injury Patients

Background and Objective Timely palliative care involvement offers demonstrable benefits for traumatic brain injury (TBI) patients; however, palliative care consultations (PCCs) are used inconsistently during TBI management. This study aimed to employ advanced machine learning techniques to elucidate the primary drivers of PCC timing variability for TBI patients. Methods Data on admission, hospital course, and outcomes were collected for a cohort of 232 TBI patients who received both PCCs and neurosurgical consultations during the same hospitalization. Principal Component Analysis (PCA) and K-means clustering were used to identify patient phenotypes, which were then compared using Kaplan-Meier analysis. An extreme gradient boosting model (XGBoost) was employed to determine drivers of PCC timing, with model interpretation performed using SHapley Additive exPlanations (SHAP). Results Cluster A (n = 86) consisted mainly of older (median [IQR] = 87 [78, 94] years), White females with mild TBIs and demonstrated the shortest time-to-PCC (2.5 [1.0, 7.0] days). Cluster B (n = 108) also sustained mild TBIs but comprised moderately younger (81 [75, 86] years) married White males with later PCC (5.0 [3.0, 10.8] days). Cluster C (n = 38) represented much younger (46.5 [29.5, 59.8] years), more severely injured, non-White patients with the latest PCC initiation (9.0 [4.2, 17.0] days). The clusters did not differ by discharge disposition (p = 0.4) or frequency inpatient mortality (p > 0.9); however, Kaplan-Meier analysis revealed a significant difference in the time from admission to PCC (p < 0.001), despite no differences in time from admission to mortality (p = 0.18). SHAP analysis of the XGBoost model identified age, sex, and race as the most influential drivers of PCC timing. Conclusions This study highlights crucial disparities in PCC timing for TBI patients and underscores the need for targeted strategies to ensure timely and equitable palliative care integration for this vulnerable population.


INTRODUCTION
Traumatic brain injury (TBI) is the leading cause of disability and mortality from traumatic injuries globally. 1,2In the United States alone, over 200,000 people are hospitalized, and nearly 70,000 die from TBI annually. 3[6][7][8] Palliative care provides active, whole-person care to individuals nearing the end of life to improve the quality of life for patients, families, and caregivers. 98][19][20][21][22] Optimal integration and timing of palliative care in TBI is a crucial yet severely understudied area that needs of further investigation. 23n response to these challenges, this study aims to uncover the primary factors in uencing the timing of initial PCCs in patients with TBI.5][26][27] We hypothesize that identifying distinct clusters of patients based on admission characteristics will reveal signi cant disparities in the timing of initial PCCs.Additionally, we theorize that factors beyond injury and clinical details are responsible for producing these clusters and play a crucial role in the timing of PCC.These insights could help clinicians identify patients with TBI at greatest need for timely palliative care and develop targeted strategies to ensure equitable access, thereby reducing unnecessary interventions and improving the quality of life of these patients and their families.

METHODS Study Design and Population
This retrospective study included adult (≥18 years) patients admitted to Johns Hopkins Medicine hospitals between 2016 and 2022 who received both neurosurgery consultation and PCC during the same hospital admission.Our initial cohort comprised 270 patients, from which we excluded non-TBI admissions (n = 34) and penetrating mechanisms of injury (MOI) (n = 4), resulting in a nal study population of 232 patients.The Johns Hopkins Medicine Institutional Review Board approved this study (IRB00309385), and the requirement for informed consent was waived because data was collected retrospectively from electronic health records (EHRs).We used the STROBE cohort checklist when writing our report. 28

Data Collection and Preprocessing
Data were extracted from Johns Hopkins Medicine EHRs, encompassing a broad range of variables categorized into admission, hospital course, and outcome variables.Admission variables included demographics, clinical and injury characteristics, radiographic ndings, attending neurosurgeon, and care decision details such as a care-limiting directive present on admission and the identity of the surrogate decision-maker (SDM).Importantly, we collected the Glasgow Coma Scale motor sub-scores (mGCS) as a validated alternative to total GCS scores for intubated TBI patients. 29spital-course variables encompassed intensive care unit (ICU) admission and length of stay, interactions between surrogate decision-makers (SDMs) and providers, and neurosurgical interventions.
These interventions were quanti ed using the Therapy Intensity Level Scale (TILS). 30The TILS score was determined by summing the scores for head positioning for intracranial pressure (ICP) management (1 point possible), cerebral perfusion pressure (CPP) therapy (2 points), cerebrospinal uid (CSF) drainage (3 points), mechanical ventilation (4 points), temperature management (5 points), hyperosmolar therapy (6 points), sedation level (8 points), and decompressive surgery (9 points), where higher scores represent a greater degree of intervention intensity.Outcome variables included discharge disposition, inpatient mortality, and time-to-event data for PCC and mortality.Time-to-event metrics were computed as the number of days from hospital admission to the event using EHR-recorded dates.
Given the high dimensionality of the data relative to the sample size, traditional statistical approaches were deemed inappropriate, leading to the adoption of more sophisticated machine learning techniques. 31Data preprocessing involved cleaning, standardizing, and transforming categorical variables into one-hot-encoded indicators to facilitate machine learning algorithm compatibility.No data were missing among continuous variables, while missing data among categorical variables were treated as an additional "unknown" category, where applicable.

Principal Component Analysis and K-means Clustering
The application of Principal Component Analysis (PCA) and K-means clustering aids in the simpli cation and categorization of complex patient data, allowing for a more focused analysis of critical factors in uencing the timing of palliative care.First, PCA was utilized to reduce the dimensionality of the dataset, facilitating the identi cation of the most important variables within the extensive dataset.Following dimensionality reduction through PCA, K-means clustering was applied to categorize patients into K distinct groups based on the similarity of their data pro les, enabling the identi cation of patterns and similarities in patient characteristics and treatment variables.The optimal number of clusters (K) was determined using the gap statistic method (SUPPLEMENTARY FIGURE 1). 32Clusters were built solely using admission variables.PCA and K-means clustering were performed using R software (version 4.2.1).PCA plots were visualized using the ggplot2 package (version 3.4.4).

Statistical Comparison of Clusters
K-means-identi ed clusters (A, B, and C) were then statistically compared.Categorical variables were analyzed using Pearson's chi-squared or Fisher's Exact Test, while continuous variables were analyzed using the Kruskal-Wallis rank sum test because of signi cant skewness in some variables.Post-hoc pairwise comparisons were adjusted for multiple testing with Benjamini-Hochberg and Bonferroni corrections for overall and pairwise tests, respectively.Kaplan-Meier curves, strati ed by cluster, were generated for time-to-PCC and time-to-mortality using the survminer package (version 0.4.9), with differences assessed using a log-rank test.Mortality measured by the survival analysis included death recorded in the patient EHRs at any point between initial admission and censoring.Patients were censored at the most recent patient encounter recorded within their EHR.A small random jitter (between 0 and 1 day) was added to the Kaplan-Meier curves to improve visualization, although test statistics were computed using the original data.

XGBoost Model and SHAP Analysis
An extreme gradient-boosted decision tree model was built in Python (version 3.10.12)using the XGBoost library (version 1.3.2) to model and understand time-to-PCC.The XGBoost model was selected because tree ensemble methods have been shown to consistently outperform competing methods for regression and classi cation tasks using tabular data. 33Superior performance over a simpler alternative, the Least Absolute Shrinkage and Selection Operator (LASSO) regression model, was con rmed for our analysis via bootstrap testing over 100 replications (p < 0.001).XGBoost hyperparameters, including learning rate, tree depth, and sampling ratios, were tuned by randomized search cross-validation (CV) over 100 replications of 5-fold strati ed CV, with nal training involving early stopping over 100 iterations.
Interpretability of the XGBoost model was enhanced using SHapley Additive exPlanations (SHAP) values.SHAP values explain the output of machine learning models by decomposing the model predictions into the sum of effects of each variable, providing insights into how each variable in uences time-to-PCC.This approach has been previously used to understand machine learning models employed in the context of neurocritical care. 34The ten variables with the highest mean absolute SHAP values were considered the most in uential features in this analysis.The SHAP Python library (version 0.44.0)facilitated the analysis of the most in uential features by generating (1) a summary plot of mean absolute SHAP values, (2) scatter plots of SHAP values for each variable, (3) a heatmap of SHAP interaction values, and (4) scatter plots of important interactions.

Characterization and Comparison of Patient Clusters
Principal component analysis (PCA) captured 8.9%, 5.9%, and 4.9% of the total variance in the rst three principal components, respectively.K-means clustering partitioned observations into three distinct clusters, which are visualized using two-and three-dimensional plots (FIGURE 1).Each cluster presented with unique characteristics (TABLE 1).Among the characteristics available at presentation, the clusters differed signi cantly across 65% (34/52) of all the admission variables recorded (SUPPLEMENTARY TABLE 1).

XGBoost Model and SHAP Analysis
An XGBoost model, enhanced by SHAP value analysis for model interpretability, identi ed age as the most important factor in uencing time-to-PCC, followed by male sex and White race.Notably, these demographic factors were more in uential than clinical factors, such as neurological presentation, radiographic ndings, comorbidities, mechanism of injury, and care-limiting directive present on admission (FIGURE 3).
The SHAP analysis offered a visual and comprehensive summary of the impact of each feature on the model (SUPPLEMENTARY FIGURE 2).Further investigation revealed nonlinear relationships between age, race, sex, and BMI, identi ed through interaction evaluations using a SHAP heatmap (SUPPLEMENTARY FIGURE 3) and scatterplots (FIGURE 4).Speci cally, the strongest interaction indicated that younger patients with lower BMI were more likely to experience longer time-to-PCC, while the opposite was true for patients with low BMI older than 70 years (FIGURE 4).Other important interactions included Age by Race and Age by Sex, suggesting that younger non-White and younger female patients were also more likely to experience longer time-to-PCC.As with the association between age and BMI, the associations of age with race and sex also reversed directionality for patients older than 70 years (FIGURE 4).

DISCUSSION
This study signi cantly advances our understanding of palliative care consultations (PCCs) in patients with traumatic brain injury (TBI) by employing advanced machine learning techniques to identify distinct patient phenotypes and elucidate the primary drivers of PCC timing.Our ndings reveal critical variations in the timing of PCC across three clinically meaningful clusters of TBI patients, with demographics, particularly age, playing a more in uential role than any other factors, including clinical variables, injury characteristics, or surrogate decision-making details.This study is also the rst to link TBI phenotypes to critical decision-making around goals of care (GOC) and the initiation of PCCs, emphasizing how even mild divergences in presentation may hold signi cance in patient prioritization.
Unsupervised clustering revealed three distinct phenotypic clusters of TBI patients receiving palliative care (FIGURE 1).6][27] Each cluster identi ed in our study represents a unique pattern in care delivery, likely re ecting distinct clinical assessments and prognostic evaluations.Cluster A, characterized by early PCC initiation, may imply an early consensus on poor prognosis among the care team.Conversely, Cluster B's delayed PCC initiation, despite clinical similarities to Cluster A, suggests a potential missed opportunity for earlier palliative involvement.While comparable outcomes between these two clusters argue against the adverse effects of delayed PCC, earlier integration may have eased decision-making and prevented protracted suffering for these patients and families. 11Cluster C, with the most severe presentation, highest level of treatment, and latest palliative care involvement, showed outcomes comparable to the other clusters.][15][16] Together, these phenotypes underscore the differential approaches to palliative care integration, speci c to identi able patient segments.
Given that the identi ed clusters varied across a wide range of variables, we separately employed a gradient-boosted decision tree model to isolate the individual drivers of differences in PCC timing.Our gradient-boosted decision tree model, enhanced by SHAP value analysis, revealed that demographic factors, especially age, sex, and race, were the predominant drivers of PCC timing variability, outweighing the in uence of clinical and injury details (FIGURE 3).The presence of complex interactions between variables in our analysis further supports the appropriateness of our machine learning approach over traditional statistical methods that would have incorrectly assumed independence and linearity of our data (FIGURE 4).
The ndings revealed by SHAP value analysis provide potential explanations for the observed variances in PCC timing across the identi ed patient clusters.For instance, the delayed PCC initiation in Cluster B, which was largely male and moderately younger than Cluster A, suggests a potential ageism bias, where younger, male patients might have been perceived as having a more favorable prognosis or a lesser need for palliative care than the older females in Cluster A. This insight of clinician bias is in line with existing literature that highlights disparities in end-of-life care for patients with TBI. 6,7,21,22,35It also supports the increasing recognition that demographics, often unconsciously, in uence medical decision-making and care pathways. 36,37Our study thus stresses the critical need for increased awareness and the development of strategies to mitigate potential biases in clinical practice.
8][19] Its timely integration is crucial not only for its clinical bene ts but also for providing compassionate support to patients and families and aiding in the clari cation of care goals. 11,12,14,15,23,38To this end, increasing the availability of palliative services for patients with TBI and developing clinical triggers tied to in uential drivers of PCC timing could offer a systematic method to enhance consultation processes, moving them upstream to play a preventative role.Beyond standardized triggers, enhancing detection of palliative needs warrants policy efforts expanding access and reducing existing disparities. 39Current lack of adherence to the palliative care guidelines established by the American College of Surgeons Trauma Quality Improvement Program (TQIP) underscores the need for more effective implementation strategies and highlights the importance of tailoring these guidelines to address the diverse needs of TBI patients. 40,41Explicitly integrating social determinants of health frameworks into TBI management guidelines could mitigate biases and barriers to equitable care. 40Similarly, specialized training and education addressing implicit biases may increase awareness of disparate palliative integration. 42,43mplementing communication enhancements and decision aids could also facilitate more uniform, patient-centered decision-making. 42,44Ultimately, realizing timely, compassionate palliative care for all TBI patients requires multifaceted initiatives targeting clinical systems, education, and policy.

Limitations
The retrospective observational nature of our study limits our ability to draw causal conclusions and introduces the possibility of unmeasured confounding factors.Furthermore, our limited sample size (n = 232) drawn from a single healthcare system may affect the broader applicability of our ndings given the variability in TBI presentation and care across different settings.We were unable to con rm the reproducibility of our results with an independent validation cohort; however, we employed rigorous cross-validation and bootstrapping methods during model development to simulate external cohorts.Future studies should aim to directly validate our ndings in diverse healthcare environments.Lastly, we were limited to studying patients who received PCCs, but known demographic biases in uence the initial provision and acceptance of PCCs and may have further compounded our results. 17,45,46Expanding analyses to TBI cohorts not receiving PCCs could offer additional insights into equitable access to palliative services.

CONCLUSION
This study signi cantly advances our understanding of palliative care consultations (PCCs) in patients with traumatic brain injury (TBI) and identi es crucial disparities in the timing of PCCs for these patients.Speci cally, we demonstrate that injury and clinical characteristics alone inadequately explain PCC timing and revealed that demographic factors, especially age, primarily drive the variability in PCC timing.This nding underscores the need for a more equitable, patient-centered approach that goes beyond relying solely on clinical triggers to ensure timely palliative care.Future efforts should aim to validate these results, develop targeted strategies that incorporate both demographic and clinical factors, address potential biases through clinician education, and promote initiatives that improve access to palliative services for TBI patients.

Declarations
Compliance Statements: Submission Instructions: this manuscript complies with all submission instructions.Authorship Requirements: Authorship requirements have been met and the nal manuscript was approved by all authors.
Prior Publication: This manuscript has not been previously published and is not under consideration at any other journal.

IRB approval: the Johns Hopkins Medicine Institutional Review Board approved this study (IRB00309385).
Informed Consent: informed consent was waived by the IRB for this study as it only involved a retrospective review of medical records.
EQUATOR Checklist: the STROBE cohort checklist was used when writing our report and has been attached.Personal Financial Interests: SM has received speaking honoraria from the American Academy of Neurology and serves as a paid member of the Endpoint adjudication committee for Acasti Pharma Inc.
Prior Research Funding: SM has received grant funding from R21NR020231 and U01NS119647.
Other Competing Interests: The authors have no other competing interest to disclose.Tables Table 1.Key admission characteristics of patients strati ed by patient cluster.This table presents an abridged summary of the variables available at presentation for each cluster.P-values were calculated from the complete data presented in Supplemental Table 1 and show signi cant differences across clusters, with post-hoc pairwise comparisons adjusted for multiple testing using Bonferroni correction.Abbreviations: GCS = Glasgow Coma Scale, MOI = Mechanism of Injury, MVC = Motor Vehicle Collision, PCC = Palliative Care Consultation, SDM = Surrogate Decision-Maker.
Scatter plots of the three strongest interactions as determined by SHAP interaction values.Points are colored based on the value of the interacting feature, illustrating how the combination of these features impacts the SHAP value.The rst plot reveals the interaction between Age and BMI, the second between Age and Male Sex, and the third between Age and White Race.These visualizations highlight the relationships between key features in the model.Abbreviations: BMI = Body Mass Index.

Supplementary Files
This is a list of supplementary les associated with this preprint.Click to download.

Figures Figure 1
Figures

Table 3 .
Outcomes of patients strati ed by patient cluster.This table reports patient outcomes and timeto-event measures for each cluster.The p-values are adjusted for multiple comparisons, with signi cance codes indicating the level of statistical signi cance for each comparison.Abbreviations: PCC = Palliative Care Consultation, SNF = Skilled Nursing Facility, WLST = Withdrawal of Life-Sustaining Treatment.Signi cant P-values bolded.